package com.beiyou.controller;

import com.beiyou.dto.ImgsDto;
import com.beiyou.dto.UserDto;
import com.beiyou.entity.ImgsEntity;
import com.beiyou.service.ImgsService;
import com.beiyou.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author wzby
 * @Date: 2022/10/17 10:58
 */
@RestController
@RequestMapping("/api/gallery")
public class ImgsController {

    @Autowired
    private ImgsService imgsService;

    @PostMapping("/insert")
    public Integer insert(@RequestBody ImgsDto imgsDto){
        return imgsService.insert(imgsDto);
    }


    @GetMapping("/select")
    public List<ImgsDto> select(){
        return imgsService.select();
    }
}
